﻿using Guoc.BigMall.Application;
using Guoc.BigMall.Application.Search;
using Guoc.BigMall.Application.ViewObject;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Guoc.BigMall.Admin.Controllers
{
    public class DistributeMemberController : Controller
    {

        IContextFacade _context;
        IDistributeMemberFacade _distributeMemberFacade;
        public DistributeMemberController(IContextFacade context, IRoleFacade roleFacade, IDistributeMemberFacade distributeMemberFacade)
        {
            this._context = context;
            this._distributeMemberFacade = distributeMemberFacade;
        }
        public ActionResult Index()
        {
            return View();
        }

        public JsonResult LoadData(Pager page, SearchDistributeMember search)
        {
            var rows = _distributeMemberFacade.GetList(page, search);
            return Json(new { success = true, data = rows, total = page.Total, JsonRequestBehavior.AllowGet });
        }
    }
}